package edu.cornell.cs4740.qa.baseline;

import static org.junit.Assert.fail;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

public class OutputFormatterTest {

	@Test
	public void test() {
		List<Answer> question1AnsList = new ArrayList<Answer>();
		List<Answer> question2AnsList = new ArrayList<Answer>();
		
		for(int i = 0; i < 5; i++) {
			Answer ans = new Answer("1", "12345", "Tim" + i);
			question1AnsList.add(ans);
		}
		
		for(int i = 0; i < 5; i++) {

				Answer ans = new Answer("2", "12347", "Wing" + i);
				question2AnsList.add(ans);
			
		}
		
		OutputFormatter of = new OutputFormatter();
		of.submitAnswerList(question1AnsList);
		of.submitAnswerList(question2AnsList);
		try {
			of.generateFile(new File("test_out.txt"));
		} catch (IOException e) {
			e.printStackTrace();
			fail("IOException");
		}
	}

}
